package com.codenum.codegenerator;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

/**
* the Uuinwruj type
*/
@SuppressWarnings("ALL")
public class Uuinwruj {


        private static volatile Uuinwruj instance;

        /**
        * 方法MethodMap
        */
        private Map<String, Method> methodMap = new HashMap<>(32);

        private Map<String, Object> saleTypeMap = new HashMap<>(64);

        public static Uuinwruj getInstance() {
            if (instance == null) {
                synchronized (Uuinwruj.class) {
                    if (instance == null) {
                        instance = new Uuinwruj();
                    }
                }
            }
            return instance;
        }


        private Uuinwruj() {

        }



    public  Boolean judgeEceicjywsh(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeNzowbjdais(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeFjxidbcawo(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeRiekteezos(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeNjykillrxu(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeNjnhvjfmor(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeApmfepaugj(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeUoxscuzkvo(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeLapkxhdsfw(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeLjjlynycfr(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeMrdaptdwau(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeUxmisxyhyv(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeEvvwkhrrsm(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }

    private String  eceicjywsh;
    private String  nzowbjdais;
    private String  fjxidbcawo;
    private String  riekteezos;
    private String  njykillrxu;
    private String  njnhvjfmor;
    private String  apmfepaugj;
    private String  uoxscuzkvo;
    private String  lapkxhdsfw;
    private String  ljjlynycfr;
    private String  mrdaptdwau;
    private String  uxmisxyhyv;
    private String  evvwkhrrsm;


    public void setEceicjywsh(String eceicjywsh){
    this.eceicjywsh = eceicjywsh;
    }

    public String getEceicjywsh(){
    return this.eceicjywsh;
    }
    public void setNzowbjdais(String nzowbjdais){
    this.nzowbjdais = nzowbjdais;
    }

    public String getNzowbjdais(){
    return this.nzowbjdais;
    }
    public void setFjxidbcawo(String fjxidbcawo){
    this.fjxidbcawo = fjxidbcawo;
    }

    public String getFjxidbcawo(){
    return this.fjxidbcawo;
    }
    public void setRiekteezos(String riekteezos){
    this.riekteezos = riekteezos;
    }

    public String getRiekteezos(){
    return this.riekteezos;
    }
    public void setNjykillrxu(String njykillrxu){
    this.njykillrxu = njykillrxu;
    }

    public String getNjykillrxu(){
    return this.njykillrxu;
    }
    public void setNjnhvjfmor(String njnhvjfmor){
    this.njnhvjfmor = njnhvjfmor;
    }

    public String getNjnhvjfmor(){
    return this.njnhvjfmor;
    }
    public void setApmfepaugj(String apmfepaugj){
    this.apmfepaugj = apmfepaugj;
    }

    public String getApmfepaugj(){
    return this.apmfepaugj;
    }
    public void setUoxscuzkvo(String uoxscuzkvo){
    this.uoxscuzkvo = uoxscuzkvo;
    }

    public String getUoxscuzkvo(){
    return this.uoxscuzkvo;
    }
    public void setLapkxhdsfw(String lapkxhdsfw){
    this.lapkxhdsfw = lapkxhdsfw;
    }

    public String getLapkxhdsfw(){
    return this.lapkxhdsfw;
    }
    public void setLjjlynycfr(String ljjlynycfr){
    this.ljjlynycfr = ljjlynycfr;
    }

    public String getLjjlynycfr(){
    return this.ljjlynycfr;
    }
    public void setMrdaptdwau(String mrdaptdwau){
    this.mrdaptdwau = mrdaptdwau;
    }

    public String getMrdaptdwau(){
    return this.mrdaptdwau;
    }
    public void setUxmisxyhyv(String uxmisxyhyv){
    this.uxmisxyhyv = uxmisxyhyv;
    }

    public String getUxmisxyhyv(){
    return this.uxmisxyhyv;
    }
    public void setEvvwkhrrsm(String evvwkhrrsm){
    this.evvwkhrrsm = evvwkhrrsm;
    }

    public String getEvvwkhrrsm(){
    return this.evvwkhrrsm;
    }

    void setMethodMap(Map<String, Method> methodMap) {
        this.methodMap = methodMap;
    }

   void setSaleTypeMap(Map<String, Object> saleTypeMap) {
        this.saleTypeMap = saleTypeMap;
    }

    public Boolean judgeAttributeValue(String saleType, String methodName) {
        try {
            Object saleTypeObject = saleTypeMap.get(saleType);
            String targetMethod = methodName.replace("judge", "get");
            String attr = methodName.replace("judge", "");
            Method method = methodMap.get(targetMethod);
            Object invoke = method.invoke(saleTypeObject);
            return Objects.isNull(invoke) ? Boolean.FALSE : Objects.equals(invoke.toString().toLowerCase(), attr.toLowerCase());
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e.getMessage());
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e.getMessage());
        }
    }

}